package com.dgut.dao;


import com.dgut.domain.IUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository("iUserRepository")
@Mapper
public interface IUserRepository {

    @Select("select user_uuid,username,password,email,mobile,enabled,nice_name,registerdate,lastlogintime,pwdque,pwdans,status from pt_user where username = #{username}")
    @Results({
            @Result(property = "user_uuid",column = "user_uuid"),
            @Result(property = "username",column = "username"),
            @Result(property = "password",column = "password"),
            @Result(property = "email",column = "email"),
            @Result(property = "mobile",column = "mobile"),
            @Result(property = "enabled",column = "enabled"),
            @Result(property = "nice_name",column = "nice_name"),
            @Result(property = "registerdate",column = "registerdate"),
            @Result(property = "lastlogintime",column = "lastlogintime"),
            @Result(property = "pwdque",column = "pwdque"),
            @Result(property = "pwdans",column = "pwdans"),
            @Result(property = "status",column = "status")
    })
    IUser findByusername(String username);

}

